package com.lenovo.spider.exception;

import cn.hutool.core.util.StrUtil;

/**
 * @author <a href="mailto:liuhan3@lenovo.com">HanL(liuhan3)</a>
 * on 2018/4/13 14:01
 */
public class SpiderException extends RuntimeException {

    public SpiderException(String format, Object... params) {
        super(StrUtil.format(format, params));
    }

    /**
     * 需要重试的异常
     */
    public static class NeedRetryExcpetion extends SpiderException {
        public NeedRetryExcpetion(String format, Object... params) {
            super(format, params);
        }
    }

    /**
     * 忽略的异常
     */
    public static class IgnoreException extends SpiderException {
        public IgnoreException(String format, Object... params) {
            super(format, params);
        }
    }

}
